Software encoding and decoding method and software encryption system and software decoding system

ABSTRACT

When encoding software, two or more encoding algorithms are employed. Conversely, for software decoding processing, decoding algorithms are prepared that correspond to these two or more encoding algorithms. Then, in software encoding processing, encoded algorithm combination information is transferred to the software decoding processing along with the encoded software. During software decoding processing, opposite algorithms possessed by the decoding means are selected based on the previously mentioned algorithm combination information, and the previously mentioned encoded software is decoded.

BACKGROUND OF THE INVENTION

[0001] The present invention relates to techniques for the encoding ofcharacter, voice, animation, still image, program, or other data, and totechniques for the decoding of these kinds of encoded data.

[0002] As for software distribution formats, the method of encryptingcharacter, voice, animation, still image, program or other data andstoring this data on floppy disks, CD-ROMs, magneto-optical disks (MO),or other media, and selling these media, may be employed, or the methodof encoding said data and delivering this data to users through acommunications circuit, as well as other methods, may be employed.

[0003] In previous encoding methods of this kind, the provider has, forexample, encoded a program with a single algorithm and provided it tothe user, and the user has performed the decoding operation using,so-called “key” program provided from said user.

[0004] However, when key program possessed by the user is decoded by awrongful user, there is a fear that a copy tool will be created based onthe results of this decoding. If a large amount of these copy tools arecirculated, the provider will be forced to incur a substantial loss.

[0005] The present invention has been created bearing this problem inmind, by noting that this type of software has the specialcharacteristic of undergoing upgrades after only a brief period of time.The present invention therefore provides an encoding combination methodwhereby the encoding algorithm may be changed periodically or at everysoftware upgrade.

SUMMARY OF THE INVENTION

[0006] The present invention employs two or more encoding basicalgorithms for encoding software. Conversely, for software decodingprocessing (the software encoding apparatus), decoding basic algorithmsare prepared that correspond to these two or more encoding algorithms.Then, the software encoding apparatus transfers, along with the encodedsoftware combination information concerning the encoded algorithms tothe software decoding means (the software decoding apparatus).

[0007] The above-mentioned encoding basic algorithm means a minimumprocessing necessary to convert input data row into random data row. Forexample, convert input data row into rearrangement data row orreplacement data row. In addition, exclusive-OR of input data row andother random data row can be output.

[0008] Based on the previously mentioned algorithm combinationinformation, the software decoding means selects decoding basicalgorithms that it possesses, and decodes the previously mentionedencoded software.

[0009] Within the previously mentioned means, when the software isinputted into the software encoding apparatus, it is encoded with avoluntarily selected basic algorithm combination (for example, A1 andA3). Software that has been encoded in this way is distributed to theuser in the form of a CD-ROM or via a communications circuit. The userdecodes this encoded software with a decoding apparatus that he or shepossesses. At this time, the user decodes the relevant encoded softwarebased on the encoding combination information (for example, A1¦ ¦A3)used by the encoding apparatus. This combination information may bedelivered to the user on the same medium as the encoded software, or ona different medium, or it may be communicated to the user along withnon-illustrated key information (K).

[0010] Moreover, the combination information may be encoded by using analgorithm before updating.

[0011] In this way, if, for example, each of the individual algorithmsare relatively easy to analyze the combining of these algorithmsincreases the difficulty of analysis. Therefore, if, for example, eachindividual algorithm may in easily be grasped on its own, since there isan enormous amount of possible algorithm combinations, it would requiresignificant time and effort to analyze a combination of algorithms,making such an analysis difficult in reality. Even if there were to be apossibility of such an analysis occurring, since for every softwareupgrade, the software is encoded with a new combination of algorithms,the recent software upgrade cycle whereby software is upgraded after arelatively short period of time, is sufficient to cover for such apossibility.

[0012] In fact, a lot of hackers should challenge the combination of theencoded algorithm of infinity number and they cannot help abandoning thedecipherment work of software.

BRIEF DESCRIPTION OF THE DRAWINGS

[0013]FIG. 1 is a theoretical diagram of the present invention.

[0014]FIG. 2 is a configuration diagram of the hardware of a preferredembodiment of the present invention.

[0015]FIG. 3 is a functional block diagram of the system configurationof a preferred embodiment of the present invention.

[0016]FIG. 4 is an explanatory diagram showing an algorithm table of apreferred embodiment of the present invention.

[0017]FIG. 5 is an explanatory diagram showing a concrete example of atransposition type algorithm.

[0018]FIG. 6 is an explanatory diagram showing a concrete example of acharacter conversion type algorithm.

[0019]FIG. 7 is an explanatory diagram showing a concrete example of anexclusive algorithm.

[0020]FIG. 8 is an explanatory diagram showing a concrete example of amultiplication type algorithm.

[0021]FIG. 9 is an explanatory diagram showing a concrete example of DEStype combination processing.

[0022]FIG. 10 is an explanatory diagram showing a concrete example of anENIGMA combination.

[0023]FIG. 11 is an explanatory diagram showing a concrete example of acase where a transposition type algorithm (A1) is combined with acharacter conversion type algorithm (A3) for the performing of ENIGMAtype combination processing.

[0024]FIG. 12 is an explanatory diagram showing a concrete example of acase where encoded software that has been encoded with the combinationprocessing of FIG. 11 is decoded.

[0025]FIG. 13 is an explanatory diagram showing the hardwareconfiguration of this invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

[0026] Prior to an explanation of a detailed preferred embodiment of thepresent invention, the basic theory behind the present invention will beexplained.

[0027] As shown in FIG. 1, in the present invention, when software is tobe encoded, two or more encoding basic algorithms are employed.Conversely, for software decoding processing (the software encodingapparatus), decoding basic algorithms are prepared that correspond tothese two or more encoding basic algorithms. Furthermore, the softwareencoding apparatus transfers along with the encoded software combinationinformation concerning the encoded basic algorithms to the softwaredecoding means (the software decoding apparatus).

[0028] Based on the previously mentioned basic algorithm combinationinformation, the software decoding means selects decoding basicalgorithms that it possesses, and decodes the previously mentionedencoded software.

[0029] In this way, when the software is inputted into the softwareencoding apparatus, it is encoded with a voluntarily selected basicalgorithm combination (for example, A1 and A3). Software that has beenencoded in this way is distributed to the user in the form of a CD-ROMor via a communications circuit. The user decodes this encoded softwarewith a decoding apparatus that he or she possesses. At this time, theuser decodes the relevant encoded software based on the encodingcombination information (for example, A1¦ ¦A3) used by the encodingapparatus. This combination information may be delivered to the user onthe same medium as the encoded software, or on a different medium, or itmay be communicated to the user along with non-illustrated keyinformation (K).

[0030]FIG. 2 and FIG. 13 show the hardware configuration of the softwareencoding apparatus that is a preferred embodiment of the presentinvention.

[0031] The IC card slot (ICR), the floppy disc drive (FD) and hard diskdrive (not shown in figures) are installed in the main body of thecomputer (BDY).

[0032] The modem (MDM) and the receiver (not shown in figures) can bebuilt into the main body of the computer (BDY) and the data betransmitted or received through cable or the wireless route through theANT.

[0033] The keyboard (KEY) and the mouse (MOU) are connected with themain body of the computer (BDY) as an input device.

[0034] An display (CRT) and the printer (PRN) are connected with themain body of the computer (BDY) as an output device.

[0035] The optical disk drive (MOD) is connected with the main body ofthe computer (BDY) further as an external storage device.

[0036] Within the diagram, BUS is the bus, indicating both the controlbus and the data bus. CPU is the central processing unit, and a 32-bitor a 64-bit processor is used. MEM is the memory, which is set by theencoding combination table, to be described below, and an addressspecified by the operation domain. KEY is the keyboard, which is used toperform the input of commands into this apparatus, and to input keyinformation (K). FD is the floppy disk apparatus, which reads out thesoftware for performing encoding processing.

[0037] Although only a floppy disk is shown as the software provisionmeans, such means is not limited to this alone: a magneto-optical diskor a communications circuit may also be used. Moreover, the memory MEMor a buffer within the central processing unit CPU may also function asthe software provision means.

[0038] ICR is the IC card reader, and it is possible to equip the systemwith a PCMCIA card that conforms to the JEIDA (Japan Electronic IndustryDevelopment Association) standard. In the present preferred embodiment,the algorithms A1, A2, A3 . . . An to be discussed below are provided bybeing stored on this IC card. It is desirable to perform a physicalprotection for this IC card; for example, the algorithm data may becompletely erased by a wrongful opening of the card by a user, or cardread-out may be prevented. Furthermore, the configuration of themultiple algorithms on this card may be changed following a prescribedfixed period. If the arrangement or contents of the algorithms stored inthis card are renewed periodically, the decoding of the software may belimited to a certain period of time, enabling it to be used asdemonstration software, or as specific-system software for limited uses.

[0039] MOD is the magneto-optical disk apparatus, which is able to readfrom and write onto a magneto-optical disk with a capacity of 100megabytes or more. Also, IF is the communication interface, which isconnected to an external communications circuit.

[0040] Besides the above apparatus configuration, a CD-ROM samplingapparatus, for example, may also be connected.

[0041] Although the above is an explanation of the software encodingapparatus of FIG. 2, the software decoding apparatus has the sameconfiguration. However, when this apparatus is used as the softwaredecoding apparatus, a CD-ROM drive may also be provided. In other words,as a medium for distributing voice, still image, animation, and otherlarge amounts of data, the CD-ROM is appropriate.

[0042]FIG. 3 shows a functional block diagram of the systemconfiguration of the present preferred embodiment. Within the diagram,the upper tier shows the functions of the software encoding apparatus,while the lower tier shows the functions of the software decodingapparatus.

[0043] To explain the relationship between the functions shown in FIG. 3and the hardware explained with FIG. 2, the algorithm programs (A1, A2 .. . An) shown in FIG. 3 is provided by being stored on the IC card.Also, selection processing, combination processing, and combinationprogram processing are functions realized by using the centralprocessing unit (CPU). Key information (K) is inputted using thekeyboard (KEY). Also, the software storage file is inputted via thefloppy disk apparatus (FD) or the magneto-optical disk apparatus (MOD),and is written into the memory (MEM).

[0044] Next, FIG. 3 will be used to explain software encodingprocessing.

[0045] First, the basic algorithms to be used for software encodingprocessing are determined through selection processing by the centralprocessing unit (CPU). Here, processing is performed whereby two or morealgorithm programs are determined upon. The determination of algorithmsmay be performed, for example, by using algorithm tables, such as thoseshown in FIG. 4, which have been established within the memory (MEM).

[0046] As shown in the same diagram, n number (A1, A2 . . . An) ofalgorithms are provided in matrix form within the algorithm table. Inthis way, when n number of basic elements (algorithms) are used to formseparate combinations of two algorithms, when overlapping is permitted,n² algorithm combinations can be formed.

[0047] Conversely, in the case where any voluntary number of n number ofbasic elements (algorithms) are combined in tandem connections, whendifferent line combinations are performed for each element (algorithm),a maximum of n! number of algorithm combinations may be obtained.Furthermore, when overlapping line combinations (exchanges) arepermitted, a maximum n^(n) algorithm combinations may be formed.

[0048] For example, algorithms A1 and A2 may be combined to form A1¦¦A2, or a combination of three algorithms may be performed to form, forexample, A1¦ ¦A2¦ ¦A3. Also, the same algorithm may be combined in Lsteps, such as A1¦ ¦A1¦ ¦ . . . ¦ ¦A1.

[0049] In this way, with the present preferred embodiment, since amultiple number of algorithm combinations may be formed, even if, forexample, individual basic algorithms are easily analyzable on their own,by combining these basic algorithms together, an algorithm that isdifficult to analyze may used.

[0050] Next, a concrete algorithm example will be explained. FIG. 5shows a concrete example of a transposition type basic algorithm. Inother words, with this algorithm, a key linkage switching switch isestablished as a program, and for every 8 bits of data, bit locationsare transposed and then outputted. Key information (K) provided from anexternal source controls the transposition locations. Moreover, althoughinput/output is shown as an 8-bit configuration in the diagram, this isnot limited to such a configuration. This kind of transposition typealgorithm may, for example, be registered or stored as “A1” in thealgorithm table described previously.

[0051]FIG. 6 shows a concrete example of a character conversion typebasic algorithm. With this algorithm, output data corresponding to inputdata is placed in a table and preserved. Moreover, although input/outputis shown as a 3-bit configuration in the diagram, naturally, this is notlimited to such a configuration. This kind of character conversion typealgorithm may, for example, be registered as “A2” in the algorithm tabledescribed previously.

[0052]FIG. 7 shows a concrete example of an exclusion algorithm. Withthis algorithm for each bit of data, for example, key information (K)may be used to perform exclusive logic processing. Moreover, althoughinput/output is shown as a 3-bit configuration in the diagram,naturally, this is not limited to such a configuration. This kind ofexclusion algorithm may, for example, be registered as “A3” in thealgorithm table described previously.

[0053]FIG. 8 shows a concrete example of a multiplication typealgorithm. In this diagram, when 8-bit data is inputted, after thisinputted data is multiplied with the multiplier device using the keyinformation (K), data that has been masked with the output maskingcircuit is outputted. This kind of multiplication type algorithm may,for example, be registered as “A4” in the algorithm table describedpreviously.

[0054] When algorithms from the multiple algorithms as those describedabove are selected with the “selection processing” of the centralprocessing unit (CPU), combination processing (encoding execution means)is performed. FIG. 9 and FIG. 10 show concrete examples of thiscombination processing.

[0055]FIG. 9 shows an example of a DES type combination.

[0056] Within the diagram, when software data is inputted, it is dividedinto groups of a prescribed number of bits (for example, after every 8bits), and processing is performed on these groups. Here, the said 8-bitdata is divided into left-half data (D1) which comprises the 4high-order bits, and right-half data (D2) which comprises the 4low-order bits.

[0057] Then, the right-half data (D2) is processed with the A1algorithm, and is outputted as encoded data C1.

[0058] The left-half data (D1) undergoes exclusive logic processingalong with the previously mentioned encoded data (C1), and is outputtedas encoded data (D1+C1).

[0059] Conversely, the exclusive logic processing output data thatincludes the left-half data (D1) and the A1 algorithm output data (C1)is processed with the A2 algorithm, and is output as encoded data C2.This encoded data C2 undergoes exclusive logic processing along with theright-half data (d2), and is output as encoded data (D2+C2).

[0060] Although the decoding processing for FIG. 9 is not shown in adiagram, it is sufficient to prepare a system whereby an A1 decodingalgorithm replaces the A1 program, and an A2 decoding algorithm replacesthe A2 program shown in FIG. 9.

[0061]FIG. 10 shows an example of an ENIGMA combination. In thisexample, after inputted software is primarily changed with the A1algorithm, it undergoes a secondary change with the A2 program.

[0062] Also, as shown in the left half of the diagram, in the case wherethis is to be decoded, it is first primarily decoded with the decodealgorithm A2 ⁻¹ of algorithm A2. By then performing a secondary decodingwith the decode algorithm A1 ⁻¹ of algorithm A1, the software can bereturned to its original form.

[0063] Next, by using FIG. 11, an even more concrete preferredembodiment of an algorithm is explained. In this case, a transpositiontype algorithm (A1) is combined with a character conversion typealgorithm (A2), and ENIGMA type combination processing is performed.

[0064] First, key information (K) is provided to the key linkageswitching switch. This key information (K) is information thatprescribes how each bit of inputted 8-bit data will be transposed foroutput. In the diagram, the following key information (K) settings areprovided to the key linkage switching switch: #1 bit→#7 bit, #2 bit→#3bit, #3 bit→#2 bit, #4 bit→#5 bit, #5 bit→#1 bit, #6 bit→#8 bit, #7bit→#6 bit, #8 bit→#4 bit.

[0065] Here, when software data (ordinary character data) “OFh”—in otherwords, “00001111”—is provided, with the key linkage switching switch asprescribed with the previously described key information (K), thefollowing transpositions occur: the #1 bit “0” becomes the #7 bit, the#2 bit “0” becomes the #3 bit, the #3 bit “0” becomes the #2 bit, the #4bit “0” becomes the #5 bit, the #5 bit “1” becomes the #1 bit, the #6bit “1” becomes the #8 bit, the #7 bit “1” becomes the #6 bit, and the#8 bit “1” becomes the #4 bit. As a result, the switching result withalgorithm A1 is “10010101”, in other words, “95h”.

[0066] Next, the primary encoded data “95h” that has been encoded withalgorithm A1 then undergoes secondary encoding with the characterconversion algorithm A2.

[0067] Here, the input data (95h) is first divided into left-half data,which comprises the 4 high-order bits, and right-half data, whichcomprises the 4 low-order bits. Then, conversion is performed based oneach conversion table. As a result, the secondary encoded output databecomes “00100000”, in other words, “20h”.

[0068] Next, as shown in FIG. 3, the above selection processing,combination processing, and combination program processing is performed,and encoded software is created. This encoded software is then saved ona medium such as an MO, a CD-ROM, or a floppy disk, etc., and is sent(delivered) to the user by the provider. Also, it may be transmitted tothe user through an interface (I/O) via a communications circuit. Also,at this time, the algorithm selection order code—for example, thepreviously mentioned code “A1¦ ¦A2”—is stored on the MO, the CD-ROM, thefloppy disk, etc., that is the medium along with the encoded software.Also, in the case of communication transmission, this code may also besent with the encoded software along the communications route.Furthermore, this selection order code may be communicated from theprovider to the user along a separate delivery route than the previouslymentioned encoded software; for example, it may be explained verballyover the telephone, etc. Moreover, the selection order code may beprovided to the user together with the key information (K).

[0069] After the user has received the previously mentioned encodedsoftware and selection order code, with the decoding apparatus on theuser side, based on the previously mentioned selection order codeinformation, decoding algorithms are selected, combination processingand combination program processing is performed, and decoded software isobtained.

[0070]FIG. 12 shows a concrete example of this decoding processing.

[0071] Within the diagram, for every 8 bits (20h) of encoded data fromthe encoded software, after dividing the 4 high-order bits into lefthalf data, and the 4 low-order bits into the right half data, firstcharacter conversion is executed on these with algorithm A2 ⁻¹. Theprimary encoded data (95h) obtained with this character conversionfurther undergoes transposition conversion with the transposition typebasic algorithm A1 ⁻¹, and decode data “00001111”—in other words,“OFh”—is obtained.

What is claimed is:
 1. A software encoding and decoding methodcomprising: software encoding step for encoding a software by combiningat least two encoding basic algorithms; and software decoding step forinputting encoded software and for decoding said software with decodingbasic algorithms corresponding to said at least two encoding algorithmsused in said encoding step; wherein said software encoding processingstep includes a step of transferring information concerning saidcombination of said at least two algorithms used for encoding togetherwith the encoded software; and wherein said software decoding processingstep includes a step of selecting decoding algorithms based on saidinformation of the combination of said encoding algorithms.
 2. Thesoftware encoding and decoding method as claimed in claim 1, whereinsaid software decoding step further includes a step for decoding saidencoded software with the information of said combination of thealgorithms and key information of the algorithms.
 3. A software encodingsystem comprising: software provision means for providing software;basic algorithm provision means for providing a plurality of algorithms;selection means for selecting at least two basic algorithms from theplurality of algorithms provided by said algorithm provision means;encoding execution means for encoding software read out from saidsoftware provision means by using said at least two basic algorithmsselectively combined with said selection means; and output means foroutputting encoded software outputted from the encoding execution means.4. The software encoding system as claimed in claim 3, furthercomprising: combination sequence recording means for recording thecombination sequence of said at least two basic algorithms selected withsaid selection means; and wherein said output means outputs acombination sequence data obtained from said combination sequencerecording means along with the encoded software.
 5. The softwareencoding apparatus as claimed in claim 3, wherein said encodingexecution means divides a read-out software into bit groups of apredetermined number, each bit group having specified number of bits,performs encoding processing in a parallel fashion for each of said bitgroup of bits with said at least two basic algorithms that isselectively combined with said selection means, and combines said bitgroups that has been combined.
 6. The software encoding apparatus asclaimed in claim 3, wherein said encoding execution means divides aread-out software into bit groups of a predetermined number, each bitgroup having specified number of bits, performs encoding processing foreach of said bit group in order with said at least two basic algorithmsthat is selectively combined with said selection means, and combinessaid bit groups that has been combined.
 7. A software decoding systemcomprising: encoded software provision means for providing, softwarethat is encoded; algorithm provision means for providing a plurality ofbasic algorithms; selection means for selecting at least two basicalgorithms that are necessary for decoding of software from theplurality of basic algorithms provided by said algorithm provisionmeans; combination sequence recording means for recording thecombination sequence of said at least two algorithms that is selectedwith said selection means; and decoding execution means for decodingencoded software provided from said encoded software provision means byusing said at least two algorithms that is selectively combined withsaid selection means.
 8. The software decoding means as claimed in claim7, wherein said algorithm provision means is an execution program ofsaid at least two algorithms and is maintained within a recording mediumthat is physically protected from an external source.